package com.mmall.concurrency.example.publish;

import com.sun.media.jfxmedia.logging.Logger;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;

@Slf4j
public class Unsafepulish {
    private String[]states={"a","b","c"};

    public String[] getStates(){
        return states;
    }

    public static void main(String[] args) {
        Unsafepulish unsafepulish=new Unsafepulish();
        log.info("{}", Arrays.toString(unsafepulish.getStates()));
        unsafepulish.getStates()[0]="d";
        log.info("{}", Arrays.toString(unsafepulish.getStates()));
    }
}
